﻿@model List<Web.WebServiceRef.MessageRepresentation>

<script type="text/javascript">
    $(function () {
        $("table.tablesorter").tablesorter({ headers: { 0: { sorter: false } } })
        .tablesorterPager({ container: $("#pager") });
    });
</script>

<table class="tablesorter">
<thead>
    <tr>
        <th>
            read
        </th>
        <th>
            title
        </th>
        <th>
            Message
        </th>
        <th>
            sender
        </th>
        <th>
            time sent
        </th>
    </tr>
    </thead>
    <tbody>
@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.read)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.title)
        </td>
        <td>
            @Html.TextAreaFor(modelItem => item.text, new { disabled = true } )
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.sender)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.timesent)
        </td>
    </tr>
}
</tbody>
</table>
<div id="pager" class="pager">
	<form>
		<img src="@Url.Content("~/Content/images/first.png")" class="first" />
            <img src="@Url.Content("~/Content/images/prev.png")" class="prev" />
            <input type="text" class="pagedisplay" />
            <img src="@Url.Content("~/Content/images/next.png")" class="next" />
            <img src="@Url.Content("~/Content/images/last.png")" class="last" />
		<select class="pagesize">
			<option selected="selected" value="5">5</option>
			<option value="10">10</option>
			<option value="15">15</option>
			<option  value="20">20</option>
		</select>
	</form>
</div>
